Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that client use same endpoint for a given registration #1655

Open
wants to merge 4 commits into
base: clean_test
Choose a base branch
from

Conversation

sbernard31
Copy link
Contributor

@sbernard31 sbernard31 commented Oct 11, 2024

This was discuss at #1415

So,

  • Registration.getLastEndpointUsed() is now Registration.getEndpointUri()
  • Authorizer check clients use same server endpoint for a given registration.
  • now Authorizer is used in SendHandler to check for SEND request too.

The main consequence is that if you persist your registration and re-run Leshan server with different endpoint this could lead to unexpected issue. Like registration can not be reused if the server endpoint doesn't exist anymore or have different Uri.

Typically, if you persist registration and you create your endpoint with a wildcard port number (letting system pick a free port for you) when you will restart the server this will probably lead to issue. But my guess is this is not a real production use cases.

@sbernard31 sbernard31 changed the base branch from master to clean_test October 17, 2024 09:28
@sbernard31 sbernard31 marked this pull request as ready for review October 17, 2024 09:28
@sbernard31
Copy link
Contributor Author

@JaroslawLegierski , @cyril2maq, It could be worth to look at this too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant